﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ZH.Infrastructure.Dto.Response.Pro;
using ZH.Service.Interface;

namespace ZH.Api.Admin.Controllers.Cashier
{
    /// <summary>
    /// 收银端·产品/商品
    /// </summary>
    [Authorize(Roles = "Cashier")]
    public class C_ProductController : BaseController
    {
        public readonly I_Pro_Service _pro_Service;

        public C_ProductController(I_Login_Service login_Service, I_Pro_Service pro_Service) : base(login_Service) 
        {
            _pro_Service = pro_Service;
        }

        /// <summary>
        /// 获取产品列表
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public async Task<IActionResult> Get_Cashier_Pro() 
        {
            var result = await _pro_Service.Get_Cashier_Pro();

            return Ok(result);
        }
    }
}
